﻿IF OBJECT_ID ('CHO_SCHEDULE_TYPES') IS NOT NULL
	DROP TABLE CHO_SCHEDULE_TYPES
GO

CREATE TABLE CHO_SCHEDULE_TYPES
	(
	TASK_SCHEDULE_TYPE_ID    INT NOT NULL,
	TASK_SCHEDULE_TYPE_DESC  NVARCHAR (50) NOT NULL,
	CONSTRAINT PK_CHO_SCHEDULE_TYPES PRIMARY KEY (TASK_SCHEDULE_TYPE_ID)
	)
GO

INSERT INTO CHO_SCHEDULE_TYPES VALUES (1, 'DAILY')
GO
INSERT INTO CHO_SCHEDULE_TYPES VALUES (2, 'WEEKLY')
GO
INSERT INTO CHO_SCHEDULE_TYPES VALUES (3, 'MONTHLY')
GO
INSERT INTO CHO_SCHEDULE_TYPES VALUES (4, 'ONCE')
GO

----------------------------------------------------------------

IF OBJECT_ID ('CHO_SELECT_TASK_SCHEDULE_TYPES') IS NOT NULL
	DROP PROC CHO_SELECT_TASK_SCHEDULE_TYPES
GO

CREATE PROCEDURE CHO_SELECT_TASK_SCHEDULE_TYPES
		AS
	
	SET NOCOUNT ON

	SELECT TASK_SCHEDULE_TYPE_ID, TASK_SCHEDULE_TYPE_DESC FROM CHO_SCHEDULE_TYPES
GO
